<h2><%= @operation.name %></h2>

<% form_for (@operation) do |f| %>
<%= f.error_messages %>
	<dl class="crud">
		<dt><%= f.label :name %></dt>
		<dd><%= f.text_field :name %></dd>

		<dt><%= f.label :value %></dt>
		<dd><%= f.text_field :value %></dd>
		
		<dt>Account</dt>
		<dd><%= select("operation", "account_id", Account.find(:all).collect {|a| [a.bank, a.id] } ) %></dd>
		
		<dt><%= f.label :expiration_date %></dt>
		<dd><%= text_field_tag ("operation[expiration_date]", @operation.expiration_date.to_date.to_s, :maxlength => 10) unless @operation.expiration_date.nil? %></dd>
	
		<dt><%= f.label :pay_date %></dt>
		<dd><%= text_field_tag ("operation[pay_date]", @operation.pay_date.to_date.to_s, :maxlength => 10) unless @operation.pay_date.nil? %></dd>
		
		<dt><%= f.label :details %></dt>
		<dd><%= f.text_area :details %></dd>

		<%= f.submit "Update", :class => 'button' %>
		<%= f.submit "Cancel", :class => 'button', :value => 'Cancel' %>

	</dl>
<% end %>